package com.example.demo.controller;

import com.example.demo.basic.ScProducer;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @ClassName MQTestController
 * @Description
 * @Author zhangdachen
 * @Date 2021-09-15 13:38
 * @Version V1.0
 **/
@RestController
@RequestMapping("/MQTest")
public class MQTestController {
    @Resource
    private ScProducer scProducer;

    @GetMapping("/sendMessage")
    public void sendMsssage(String msg){
        scProducer.sendMessage(msg);
        System.out.println("消息发送成功");
    }
}
